package com.lins.framework.common;

import android.content.Context;

import com.lins.framework.utils.SharedPrefsUtil;


/**
 * Created by Admin on 2017/5/11.
 */

public class UserInfo {

    /**
     * 判断用户是否已经登录
     *
     * @return
     */
    public static boolean isLogin(Context context) {
        int uid = SharedPrefsUtil.getValue(context, "uid", 0);
        if (uid <= 0)
            return false;
        else
            return true;
    }

    public static int getUserId(Context context) {
        return SharedPrefsUtil.getValue(context, "uid", 0);
    }

    public static String getUserToken(Context context) {
        return SharedPrefsUtil.getValue(context, "token", "");
    }
}
